package xyz.xmh.pattern.behavioral.observerpattern;

/**
 * @author Administrator
 * <p>
 * 观察者的八进制实现类
 */
public class OctalObserver extends AbstractObserver {

    public OctalObserver(Subject subject) {
        this.subject = subject;
        this.subject.addObserver(this);
    }

    @Override
    public void update() {
        System.out.println("Octal String: " + Integer.toOctalString(subject.getState()));
    }
}
